
public abstract class Liti {
	public abstract float getBiaomianji();
	public abstract float getTiji();
}
 class Qiu extends Liti{
	 private float r;
	 public Qiu(float r){
       this.r = r;
	}
	public float getR() {
		return r;
	}
	public void setR(float r) {
		this.r = r;
	}
	public float getBiaomianji(){
		 
		 float bj =  (float) (getR() * getR() *4.0 * Math.PI);
		 return bj;
	}
	public  float getTiji(){
		 float tj = (float) (3.0/4.0 * Math.PI * getR() * getR() * getR());
		 return tj;
	}
}
 class Yuanzhu extends Liti{
	 private float r;
	 private float high;
	 public Yuanzhu(float r,float high){
		 this.r = r;
		 this.high = high;
	 }
	public float getR() {
		return r;
	}

	public void setR(float r) {
		this.r = r;
	}

	public float getHigh() {
		return high;
	}

	public void setHigh(float high) {
		this.high = high;
	}

	public float getBiaomianji() {
		return  (float) (2*3.14*getR()*getHigh()+2*3.14*getR()*getR());
	}
	public float getTiji() {
		// TODO Auto-generated method stub
		return (float)3.14*getR()*getHigh()*getR();
	}
	 
 }
class Yuanzui extends Liti{
	 private float r;
	 private float high;
	public Yuanzui(float r, float high) {
		super();
		this.r = r;
		this.high = high;
	}
	public float getR() {
		return r;
	}
	public void setR(float r) {
		this.r = r;
	}
	public float getHigh() {
		return high;
	}
	public void setHigh(float high) {
		this.high = high;
	}
	public float getBiaomianji() {
		return (float) ((float)1/3*3.14*getR()*getHigh()*getR());
	}
	public float getTiji(){
		return (float) (3.14*getR()*getR()+3.14* Math.sqrt(getR()*getR()+getHigh()*getHigh()));
	}
 
 }
 
